unit dgAddNet ;

interface

uses
   Windows,
   Messages,
   SysUtils,
   Variants,
   Classes,
   Graphics,
   Controls,
   Forms,
   Dialogs,
   SpTBXControls,
   StdCtrls,
   SpTBXEditors,
   TBXDkPanels,
   TBXExtItems,
   TB2Item,
   TBX,
   SpTBXItem,
   TB2ExtItems,
   TB2Dock,
   TB2Toolbar,
   uBasic,
   TntStdCtrls,
   uObjects,
   GDIPAPI,
   GDIPOBJ ;

type
   TdlgAddNet = class( TForm )
      Panel : TSpTBXPanel ;
      btOK : TSpTBXButton ;
      btCancel : TSpTBXButton ;
      SpTBXGroupBox3 : TSpTBXGroupBox ;
      edLabel : TSpTBXEdit ;
      procedure btOKClick( Sender : TObject ) ;
      procedure FormCreate( Sender : TObject ) ;
   private
      fNet : TMedaNet ;
      procedure SetNet( const Value : TMedaNet ) ;
      procedure SetTitle( const Value : string ) ;
   public
      property Title : string write SetTitle ;
      property Net : TMedaNet read fNet write SetNet ;
   end ;

implementation

{$R *.dfm}

   { TdlgAddNet }

procedure TdlgAddNet.FormCreate( Sender : TObject ) ;
begin
   fNet := nil ;
   Caption := ' New Net' ;
end ;

procedure TdlgAddNet.SetNet( const Value : TMedaNet ) ;
begin
   fNet := Value ;
   if assigned( fNet ) then begin
      edLabel.Text := fNet.Name ;
   end ;
end ;

procedure TdlgAddNet.SetTitle( const Value : string ) ;
begin
   Caption := Value ;
end ;

procedure TdlgAddNet.btOKClick( Sender : TObject ) ;
begin
   if assigned( fNet ) then begin
      fNet.Name := edLabel.Text ;
   end ;
end ;

end.

